import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
//应收
export const columns: BasicColumn[] = [
  {
    title: '社区名称',
    align: "center",
    dataIndex: 'communityName',
    width: 100
  },
  {
    title: '房产编号',
    align: "center",
    dataIndex: 'propertyNumber',
    width: 80
  },
  {
    title: '业主名称',
    align: "center",
    dataIndex: 'ownerName',
    width: 80
  },
  {
    title: '账期',
    align: "center",
    dataIndex: 'accountingPeriod',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
    width: 100
  },
  {
    title: '管道加压费',
    align: "center",
    dataIndex: 'pipelinePressurizationfee',
    width: 50
  },
  {
    title: '卫生费',
    align: "center",
    dataIndex: 'publicSanitation',
    width: 50
  },
  {
    title: '车位服务费',
    align: "center",
    dataIndex: 'parkingServices',
    width: 50
  },
  {
    title: '水费',
    align: "center",
    dataIndex: 'water',
    width: 50
  },
  {
    title: '物业费',
    align: "center",
    dataIndex: 'propertyManagement',
    width: 50
  },
  {
    title: '物业费六折',
    align: "center",
    dataIndex: 'propertyManagementSix',
    width: 50
  },
  // {
  //   title: '电卡补卡费',
  //   align: "center",
  //   dataIndex: 'electricCardReplacement',
  //   width: 50
  // },
  {
    title: '账单合计',
    align: "center",
    dataIndex: 'totalBill',
    width: 50
  },
  // {
  //   title: '违约金',
  //   align: "center",
  //   dataIndex: 'weiyuejin'
  // },
  // {
  //   title: '总计',
  //   align: "center",
  //   dataIndex: 'zongji'
  // },
  // {
  //   title: '缴费方式',
  //   align: "center",
  //   dataIndex: 'paymentMethod'
  // },

];
//实收
export const columns2: BasicColumn[] = [
  {
    title: '社区名称',
    align: "center",
    dataIndex: 'communityName',
    width: 100
  },
  {
    title: '房产编号',
    align: "center",
    dataIndex: 'propertyNumber',
    width: 100
  },
  {
    title: '业主姓名',
    align: "center",
    dataIndex: 'ownerName',
    width: 100
  },
  {
    title: '账期',
    align: "center",
    dataIndex: 'accountingPeriod',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
    width: 100
  },
  {
    title: '管道加压费',
    align: "center",
    dataIndex: 'pipelinePressurizationfee',
    width: 50
  },
  {
    title: '卫生费',
    align: "center",
    dataIndex: 'publicSanitation',
    width: 50
  },
  {
    title: '车位服务费',
    align: "center",
    dataIndex: 'parkingServices',
    width: 50
  },
  {
    title: '水费',
    align: "center",
    dataIndex: 'water',
    width: 50
  },
  {
    title: '物业费',
    align: "center",
    dataIndex: 'propertyManagement',
    width: 50
  },
  {
    title: '物业费六折',
    align: "center",
    dataIndex: 'propertyManagementSix',
    width: 50
  },
  {
    title: '账单合计',
    align: "center",
    dataIndex: 'totalBill',
    width: 50
  },
  {
    title: '违约金',
    align: "center",
    dataIndex: 'weiyuejin',
    width: 50
  },
  {
    title: '总计',
    align: "center",
    dataIndex: 'zongji',
    width: 50,
  },
  {
    title: '缴费方式',
    align: "center",
    dataIndex: 'paymentMethod',
    width: 50,
  },
];

//欠收
export const columns3: BasicColumn[] = [
  {
    title: '社区名称',
    align: "center",
    dataIndex: 'communityName',
    width: 100
  },
  {
    title: '房产编号',
    align: "center",
    dataIndex: 'propertyNumber',
    width: 100
  },
  {
    title: '业主名称',
    align: "center",
    dataIndex: 'ownerName',
    width: 100
  },
  {
    title: '账期',
    align: "center",
    dataIndex: 'accountingPeriod',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
    width: 100
  },
  {
    title: '管道加压费',
    align: "center",
    dataIndex: 'pipelinePressurizationfee',
    width: 50
  },
  {
    title: '卫生费',
    align: "center",
    dataIndex: 'publicSanitation',
    width: 50
  },
  {
    title: '车位服务费',
    align: "center",
    dataIndex: 'parkingServices',
    width: 50
  },
  {
    title: '水费',
    align: "center",
    dataIndex: 'water',
    width: 50
  },
  {
    title: '物业费',
    align: "center",
    dataIndex: 'propertyManagement',
    width: 50
  },
  {
    title: '物业费六折',
    align: "center",
    dataIndex: 'propertyManagementSix',
    width: 50
  },
  // {
  //   title: '电卡补卡费',
  //   align: "center",
  //   dataIndex: 'electricCardReplacement',
  //   width: 50
  // },
  {
    title: '账单合计',
    align: "center",
    dataIndex: 'totalBill',
    width: 80
  },
  // {
  //   title: '违约金',
  //   align: "center",
  //   dataIndex: 'weiyuejin',
  //   width: 50
  // },
  // {
  //   title: '总计',
  //   align: "center",
  //   dataIndex: 'zongji',
  //   width: 50,
  // },

  // {
  //   title: '报表类型',
  //   align: "center",
  //   dataIndex: 'reportType_dictText'
  // },

];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "社区名称",
    field: 'communityName',
    component: 'JSearchSelect',
    componentProps:{
      dict: ",,"
    },
    //colProps: {span: 6},
  },
  {
    label: "房产编号",
    field: 'propertyNumber',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "账期",
    field: 'accountingPeriod',
    component: 'DatePicker',
    //colProps: {span: 6},
  },
  {
    label: "付款方式",
    field: 'paymentMethod',
    component: 'JCategorySelect',
    componentProps:{
      pcode: "C03",//back和事件未添加，暂时有问题
    },
    //colProps: {span: 6},
  },
  {
    label: "缴费时间",
    field: "paymentTime",
    component: 'RangePicker',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '社区名称',
    field: 'communityName',
    component: 'JSearchSelect',
    componentProps:{
      dict: ""
    },
  },
  {
    label: '房产编号',
    field: 'propertyNumber',
    component: 'Input',
  },
  {
    label: '业主名称',
    field: 'ownerName',
    component: 'Input',
  },
  {
    label: '账期',
    field: 'accountingPeriod',
    component: 'DatePicker',
  },
  {
    label: '管道加压费',
    field: 'pipelinePressurizationFee',
    component: 'InputNumber',
  },
  {
    label: '卫生费',
    field: 'publicSanitation',
    component: 'InputNumber',
  },
  {
    label: '车位服务费',
    field: 'parkingServices',
    component: 'InputNumber',
  },
  {
    label: '水费',
    field: 'water',
    component: 'InputNumber',
  },
  {
    label: '物业费',
    field: 'propertyManagement',
    component: 'InputNumber',
  },
  {
    label: '物业费六折',
    field: 'propertyManagementSix',
    component: 'InputNumber',
  },
  {
    label: '电卡补卡费',
    field: 'electricCardReplacement',
    component: 'InputNumber',
  },
  {
    label: '账单合计',
    field: 'totalBill',
    component: 'InputNumber',
  },
  {
    label: '付款方式',
    field: 'paymentMethod',
    component: 'JCategorySelect',
    componentProps:{
      pcode: "C03", //TODO back和事件未添加，暂时有问题
    },
  },
  {
    label: '缴费时间',
    field: 'paymentTime',
    component: 'DatePicker',
  },
  {
    label: '创建日期',
    field: 'createTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '违约金',
    field: 'weiyuejin',
    component: 'InputNumber',
  },
  {
    label: '总计',
    field: 'zongji',
    component: 'InputNumber',
  },
  {
    label: '报表类型',
    field: 'reportType',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "report_type"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// // 高级查询数据
export const superQuerySchema = {
  communityName: {title: '社区名称',order: 0,view: 'sel_search', type: 'string',},
  propertyNumber: {title: '房产编号',order: 1,view: 'text', type: 'string',},
  ownerName: {title: '业主名称',order: 2,view: 'text', type: 'string',},
  accountingPeriod: {title: '账期',order: 3,view: 'date', type: 'string',},
  pipelinePressurizationFee: {title: '管道加压费',order: 4,view: 'number', type: 'number',},
  publicSanitation: {title: '卫生费',order: 5,view: 'number', type: 'number',},
  parkingServices: {title: '车位服务费',order: 6,view: 'number', type: 'number',},
  water: {title: '水费',order: 7,view: 'number', type: 'number',},
  propertyManagement: {title: '物业费',order: 8,view: 'number', type: 'number',},
  propertyManagementSix: {title: '物业费六折',order: 9,view: 'number', type: 'number',},
  electricCardReplacement: {title: '电卡补卡费',order: 10,view: 'number', type: 'number',},
  totalBill: {title: '账单合计',order: 11,view: 'number', type: 'number',},
  weiyuejin: {title: '违约金',order: 15,view: 'number', type: 'number',},
  zongji: {title: '总计',order: 16,view: 'number', type: 'number',},
  reportType: {title: '报表类型',order: 17,view: 'list', type: 'string',dictCode: 'report_type',},
};
